<!--
 * @Author: 隔壁小王 18398748175@163.com
 * @Date: 2023-12-22 14:26:56
 * @LastEditors: 隔壁小王 18398748175@163.com
 * @LastEditTime: 2023-12-22 17:21:21
 * @FilePath: \vue-web-demo\src\App.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
  <div id="app">
    <!-- <router-view v-if="IsRouterAlive" /> -->
    <router-view />
  </div>
</template>
<script>
export default {
  provide() {
    return {
      reload: this.reload,
    };
  },
  data() {
    return {
      IsRouterAlive: true,
    };
  },
  methods: {
    //无感刷新页面
    reload() {
      this.IsRouterAlive = false;
      this.$nextTick(function () {
        this.IsRouterAlive = true;
      });
    },
  },
};
</script>
<style lang="scss">
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  // text-align: center;
  color: #2c3e50;
}

nav {
  padding: 30px;

  a {
    font-weight: bold;
    color: #2c3e50;

    &.router-link-exact-active {
      color: #42b983;
    }
  }
}
</style>
